<!DOCTYPE html>
<html lang="en">

<head>
    <#include "/lx/admin/components/meta.html" />
    <title>关注统计 ${metaTitleSuffix!}</title>
    <#include "/lx/admin/components/stylesheets.html" />
</head>

<body>
    <div id="app">
        <el-container>
            <#assign menuIndex="8-1" />
            <#include "/lx/admin/components/menu.html" />
            <el-container>
                <#include "/lx/admin/components/header.html" />
                <el-main>
                    <template>
                        <el-row>
                            <el-col :span="12">
                                <div class="title theme-color1">关键字搜索</div>
                            </el-col>
                        </el-row>
                        <div class="search">
                            <el-input v-model="keyword" placeholder="请输入内容" clearable>
                                <el-button slot="append" icon="el-icon-search" @click="onSearch"></el-button>
                            </el-input>
                        </div>
                        <el-table ref="multipleTable" :data="list" tooltip-effect="dark" :stripe='true' style="width: 100%">
                            <el-table-column prop="schoolName" label="大学">
                            </el-table-column>
                            <el-table-column prop="question" label="标题">
                            </el-table-column>
                            <el-table-column prop="updateTime" label="操作">
                                <template slot-scope="props">
                                    <a :href="'/lx/admin/question/info?id='+props.row.id+'&schoolId='+props.row.schoolId">编辑</a>
                                </template>
                            </el-table-column>
                        </el-table>
                        <#include "/lx/admin/components/page.html" />
                    </template>
                </el-main>
            </el-container>
        </el-container>
        <#include "/lx/admin/components/footer.html" />
    </div>
    <#include "/lx/admin/components/scripts.html" />
    <script src="/components/utils.js"></script>
    <script>
        var vue = new Vue({
        el: '#app',
        data() {
            return {
                list: [],
                dateRange: '',
                schools: [],
                schoolId: '',
                companies: [],
                companyId: '',
                status: '',
                keyword:'${keyword!''}'
            }
        },
        mounted: function() {
            this.schools = ${schools!'[]'}
            var schoolId = '${schoolId!""}'
            if (schoolId != '') {
                this.schoolId = Number(schoolId);
            } 
        },
        methods: {
            onSearch() {
                var self = this;
                var keys = [
                    { key: 'keyword', value: self.keyword }
                ]
                goPage(1, keys);
            },
            goUserInfo(item) {
                window.location.href = "/lx/admin/user/info?userId=" + item.userId;
            }
        }
    })
    </script>
    <script>
        vue.list = toJson(`${items!'[]'}`)
    </script>
    <#include "/lx/admin/components/msg.html" />
    <style type="text/css">
    .title {
        font-size: 18px;
        font-weight: bold;
    }

    .operations {
        text-align: right;
    }

    .search {
        margin-top: 10px;
    }
    </style>
</body>

</html>